from fractions import Fraction

# 分数运算
def demo_1():
    a = Fraction(5, 4)
    print(a)
    b = Fraction(7, 16)
    print(b)
    print(a + b)
    print(a * b)
    c = a * b
    print(c.numerator)
    print(c.denominator)
    print(float(c))


if __name__ == '__main__':
    demo_1()